import {View, Text, StyleSheet, TextStyle, ViewStyle, TouchableOpacity} from 'react-native'
import React, {Component} from 'react'
import {AppIcon} from "../../../../assets/icon/AppIcon";
import styles, {padding} from "../../../../style";

export interface LabelCellProps {
    icon: {
        size: number,
        name: string,
        color: string
    }
    label: {
        text: string,
        style?: TextStyle
    },
    style?: ViewStyle,
    onPress?: () => void


}

interface LabelCellState {

}


export default class LabelCell extends Component<LabelCellProps, LabelCellState> {


    constructor(props: LabelCellProps) {
        super(props);
    }

    render() {
        const {label, style, icon, onPress} = this.props;
        return (<TouchableOpacity
            onPress={onPress}
            style={[{backgroundColor: "#fff"}, styles.flexDirectionRowNotFlex, styles.centerH, padding(13, 20), style]}>
            <AppIcon {...icon}/>
            <Text style={[{fontSize: 14, color: "#000", marginLeft: 10}, label.style]}>{label.text}</Text>
        </TouchableOpacity>)
    }
}

const labelStyle = StyleSheet.create({
    container: {}
});

 